package com.yang.mall;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
@ServletComponentScan
@MapperScan(basePackages = {"com.yang.mall.mapper"})
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
@EnableScheduling
public class YangApplication {

	public static void main(String[] args) {
		SpringApplication.run(YangApplication.class, args);
	}
	//
	//@Bean
	//public FilterRegistrationBean myFilterRegistrationBean() {
	//	FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new com.yang.mall.config.AuthTokenFilter());
	//	// 添加过滤路径
	//	filterRegistrationBean.addUrlPatterns("/*");
	//	// 保证在所有过滤器之前执行
	//	filterRegistrationBean.setOrder(Integer.MIN_VALUE);
	//	return filterRegistrationBean;
	//}
	//@Bean
	//public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
	//	StrictHttpFirewall firewall = new StrictHttpFirewall();
	//	firewall.setAllowUrlEncodedSlash(true);
	//	return firewall;
	//}

}
